# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=gcab
pkgver=0.7+16+g4bc4be1
pkgrel=1
pkgdesc="A GObject library to create cabinet files"
arch=('i686' 'x86_64')
license=('LGPL')
url="https://wiki.gnome.org/msitools"
depends=('glib2')
makedepends=('gobject-introspection' 'vala' 'zlib' 'git' 'gtk-doc' 'intltool')
_commit=4bc4be192c788c27bd4677a0513deb7c0b7d5083  # master
source=("git+https://git.gnome.org/browse/gcab#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed -e 's/^v//' -e 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --enable-gtk-doc
  make
}

package() {
  cd $pkgname
  make DESTDIR="${pkgdir}" install
}
